package cn.edu.cimv.dao.mapper;

import cn.edu.cimv.dao.entity.Option;
import cn.edu.cimv.dao.entity.Paper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Repository
public interface PaperMapper {
    //insert 论文
    void insertPaper(@Param("paper") Paper paper);
    //update 论文
    void updatePaper(@Param("paper") Paper paper);
    //delete 论文
    void deletePaper(@Param("id") int id);
    //查询论文列表
    List<Paper> queryPaper(@Param("flag") int flag);
    //查询论文列表
    List<Paper> queryPaperByPaperType(@Param("paperType") String paperType);
    //根据ID查单条论文
    Paper queryPaperById(@Param("id") int id);
    //查询最新的论文4条
    List<Paper> queryPaperLast(@Param("paperCount") int paperCount);
    List<Option> queryPaperOid();
    List<String> queryPapePaperYear(@Param("flag") int flag);
    List<Paper> queryPaperByPaperYearAndOid(@Param("oid") int oid,@Param("paperYear")String paperYear,@Param("flag")int flag);
}
